import { HttpAdapterHost, NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";
import { getConfig } from "./config";
import { AllExceptionsFilter } from "./any-exception.filter";


export async function bootstrap() {
    let config = getConfig();
    const app = await NestFactory.create(AppModule);
    app.useGlobalFilters(new AllExceptionsFilter())
    await app.listen(config.port);
}
bootstrap();
